package tjut.opp.test8;

import java.util.Scanner;

public class PlusTest {

	public static void main(String[] args) {
		int a;
		int b;
		int num;
		int c = 0;
		int sum;
		Scanner input = new Scanner(System.in);
		System.out.println("请输入一个数:");
		a = input.nextInt();
		System.out.println("请输入位数：");
		b = input.nextInt();
		num = a;
		System.out.print(num);
		//for循环
		for (int i = 1; i < b; i++) {
			a = a * 10 + num;
			System.out.print("+"+a);
			c=c+a;
		}
		sum = c + num;
		System.out.print("=" + sum);
	}

}


